#ifndef FORMATSETTINGS_H
#define FORMATSETTINGS_H

#include <QtSql>
#include <QWidget>
#include "button.h"
#include <Maestro/database.h>
#include "settingsmenuitem.h"
#include "keydialog.h"

namespace Ui {
    class FormatSettings;
}

class FormatSettings : public SettingsMenuItem {
    Q_OBJECT
public:
    FormatSettings(QWidget *parent = 0);
    ~FormatSettings();
    void test();
    void saveTest();
    void assertSaved();
    void cancelTest();
    void assertCancelled();

public slots:
    void buttonSelected();
    void save();
    void cancel();
    void reshowComponents();
    void update(KeyDialog * dialog);

protected:
    void changeEvent(QEvent *e);
    void initializeButtons();


private:
    Ui::FormatSettings *ui;
    KeyDialog * videoDialog;
    Button * addVideoExtButton;
    Button * addPhotoExtButton;
    Button * addMusicExtButton;
    QList<QWidget *> * recentlyAdded;
    Button * saveButton;
    Button * cancelButton;

    KeyDialog * photoDialog;
    KeyDialog * musicDialog;
    void addDialog(Button * button,KeyDialog * dialog) ;

};

#endif // FORMATSETTINGS_H
